'use strict';
module.exports = (app) => {
  const { STRING, INTEGER, TEXT } = app.Sequelize;
  const Case = app.model.define('w_case', {
    id: {
      type: INTEGER,
      primaryKey: true,
      autoIncrement: true,
    },
    cover: {
      comment: '封面图',
      type: STRING,
      allowNull: false,
    },
    name: {
      comment: '案例名称',
      type: TEXT('long'),
      allowNull: false,
    },
    sketch: {
      comment: '案例简述',
      type: TEXT('long'),
    },
    content: {
      comment: '案例内容',
      type: TEXT('long'),
    },
    characterId: {
      comment: '所属人物id',
      type: INTEGER,
    },
    projectId: {
      comment: '项目id',
      type: INTEGER,
      allowNull: false,
    },
  });

  return Case;
};
